package com.wang.controller;


import com.wang.service.BannerService;
import com.wang.util.JsonData;
import com.wang.vo.BannerVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author 落日孤城
 * @since 2025-05-22
 */
@RestController
@RequestMapping("/api/banner/v1")
@Api(tags = "轮播图模块")
public class BannerController {
    @Autowired
    private BannerService bannerService;
    @ApiOperation("获取轮播图列表")
    @GetMapping("/list")
    public JsonData list() {
        List<BannerVO> map = bannerService.list();
        return JsonData.buildSuccess(map);
    }
}

